﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IContractType
    {
        [OperationContract]
        int ContractType_Using(int ContractTypeID);

        [OperationContract]
        DataSet ContractType_GetAll();

        [OperationContract]
        ContractTypeInfo ContractType_GetInfo(int ContractTypeID);

        [OperationContract]
        DataSet ContractType_GetByBranchCode(string _BranchCode);

        [OperationContract]
        DataSet ContractType_GetList(out int ItemCount, int currentPage, int pageSize, string _BranchCode);

        [OperationContract]
        int ContractType_Insert(ContractTypeInfo eInfo);

        [OperationContract]
        bool ContractType_Update(ContractTypeInfo eInfo);

        [OperationContract]
        bool ContractType_Delete(int ContractTypeID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class ContractTypeInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        string _Code;
        [DataMember]
        public string Code
        {
            get { return _Code; }
            set { _Code = value; }
        }
    
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        decimal _Probation;
        [DataMember]
        public decimal Probation
        {
            get { return _Probation; }
            set { _Probation = value; }
        }

        int _Time;
        [DataMember]
        public int Time
        {
            get { return _Time; }
            set { _Time = value; }
        }

        bool _Insurance;
        [DataMember]
        public bool Insurance
        {
            get { return _Insurance; }
            set { _Insurance = value; }
        }
        string _BranchCode;
        [DataMember]
        public string BranchCode
        {
            get { return _BranchCode; }
            set { _BranchCode = value; }
        }
    }
}
